package Graph;

/**
 * TODO description
 */
import java.util.ArrayList;


public class Noeud {

	private ArrayList<Arete> list;
	private boolean visite;
	private String name;
	
	 public Noeud(String name)
	 {
		 this.name = name;
		 visite = false;
		 list = new ArrayList<Arete>();
	 }
	 
	 public void setVisite(boolean visite)
	 {
		 this.visite = visite;
	 }
	 
	 public boolean getVisit()
	 {
		 return visite;
	 }
	 
	 public String getName()
	 {
		 return name;
	 }
	 
	 public void addNoeud(Noeud n, int poids)
	 {
		 this.list.add(new Arete(poids,n));
		 n.list.add(new Arete(poids, this));
	 }
	 
	 public void addNoeud(String name, int poids)
	 {
		 Noeud n =new Noeud(name);
		 this.addNoeud(n,poids);
		 n.list.add(new Arete(poids, this));
	 }
	 
	 public ArrayList<Arete> getAretes()
	 {
		 return this.list;
	 }
	 
	 
}
